import 'package:flutter_levin/config/net/fun_api.dart';
import 'package:flutter_levin/model/article.dart';

class FunRepository {
  //置顶文章
  static Future fetchTopArticles() async {
    var resp = await http.get('article/top/json');
    return resp.data.map<Article>((item) => Article.fromMap(item)).toList();
  }
}
